2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 * Public License for more details.
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 #import <Adium/AIAccountControllerProtocol.h>
18 #import <Adium/AIStatusControllerProtocol.h>
19 #import "ESPurpleNovellAccount.h"
20 #import <Adium/AIStatus.h>
22 @implementation ESPurpleNovellAccount
24 gboolean purple_init_novell_plugin(void);
25 - (const char*)protocolPlugin
31 - (NSString *)connectionStringForStep:(int)step
36 return AILocalizedString(@"Connecting",nil);
39 return AILocalizedString(@"Authenticating",nil);
42 return AILocalizedString(@"Waiting for Response",nil);
51 * @brief Return the purple status ID to be used for a status
53 * Most subclasses should override this method; these generic values may be appropriate for others.
55 * Active services provided nonlocalized status names. An AIStatus is passed to this method along with a pointer
56 * to the status message. This method should handle any status whose statusNname this service set as well as any statusName
57 * defined in AIStatusController.h (which will correspond to the services handled by Adium by default).
58 * It should also handle a status name not specified in either of these places with a sane default, most likely by loooking at
59 * [statusState statusType] for a general idea of the status's type.
61 * @param statusState The status for which to find the purple status ID
62 * @param arguments Prpl-specific arguments which will be passed with the state. Message is handled automatically.
64 * @result The purple status ID
66 - (const char *)purpleStatusIDForStatus:(AIStatus *)statusState
67 arguments:(NSMutableDictionary *)arguments
69 const char *statusID = NULL;
70 NSString *statusName = [statusState statusName];
71 NSString *statusMessageString = [statusState statusMessageString];
73 if (!statusMessageString) statusMessageString = @"";
75 switch ([statusState statusType]) {
76 case AIAvailableStatusType:
79 case AIAwayStatusType:
80 if (([statusName isEqualToString:STATUS_NAME_BUSY]) ||
81 ([statusMessageString caseInsensitiveCompare:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_BUSY]] == NSOrderedSame))
85 case AIInvisibleStatusType:
86 statusID = "appearoffline";
89 case AIOfflineStatusType:
93 //If we didn't get a purple status ID, request one from super
94 if (statusID == NULL) statusID = [super purpleStatusIDForStatus:statusState arguments:arguments];